<template>
    <div>
         <!-- 头部 -->
    <van-nav-bar title="习题收藏" left-text="返回" left-arrow @click-left="onClickLeft">
      <template #right>
        <van-icon name="search" size="18" />
      </template>
    </van-nav-bar>

    <!-- 下拉菜单 -->
    <van-dropdown-menu>
      <van-dropdown-item title='题目类型'>
          <van-cell v-for='(item,index) in list' :key='item' :class='{isShow:active===index}' :title="item" @click='change1(index)'/>
      </van-dropdown-item>
    </van-dropdown-menu>

    <div class="img">
      <van-empty description="暂无收藏记录" />
    </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            active:0,
            list:['单选','多选','判断','连线']
        };
    },
    created() {

    },
    mounted() {

    },
    methods: {
        onClickLeft() {
      this.$router.push("/exercise");
    },
    change1(index){
       this.active = index
    },
    }
};
</script>

<style scoped>
.isShow{
  color:orange;
}
</style>
